package nGui.controls;

import nGui.controls.Control;

class Label extends Control
{
	public var text(getText,setText) : String;
	public var align(null,setAlignment) : String;

	public function new( val : String )
	{
		super();
		__c = ngui_label( untyped val.__s );
	}

	private function setAlignment( val : String )
	{
		setAttribute( "ALIGNMENT", "A"+val.toUpperCase() );
		return null;
	}

	public function setHSeparator()
	{
		setAttribute( "SEPARATOR", "HORIZONTAL" );
	}

	public function setVSeparator()
	{
		setAttribute( "SEPARATOR", "VERTICAL" );
	}

	public function setText( val : String )
	{
		setAttribute( "TITLE", val );
		return null;
	}

	public function getText() : String
	{
		return getAttribute( "TITLE" );
	}

	static var ngui_label = neko.Lib.load("nGui","ngui_element_label",1);
}